﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelPutInCard.aspx.cs" Inherits="CardLogistics.Web.MainPage.SelectPage.SelPutInCard" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>半成品/成品入库单号</title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../js/jquery.js"></script>
    <link href="../../js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
    <form runat="server" id="f2">
    <div class="rightinfo">
            <ul class="seachform">
            <li>
                <label>
                 入库单号</label><asp:TextBox ID="txt_PutInNo" runat="server" CssClass="scinput" Width="100px"></asp:TextBox>
            </li>
            <li>
                <label>
                   入库日期</label><asp:TextBox ID="txt_PutInStartDate" runat="server" CssClass="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                        Width="100px"></asp:TextBox>&nbsp;至
                    <asp:TextBox ID="txt_PutInEndDate" runat="server" CssClass="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                        Width="100px"></asp:TextBox>
            </li>
            <li>
                <label>
                    &nbsp;</label>
                <asp:Button ID="btn_Search" runat="server" Text="查询" CssClass="scbtn" OnClick="btn_Search_Click" /></li>
        </ul>
        <asp:Repeater ID="rptList" runat="Server">
            <HeaderTemplate>
                <table class="tablelist">
                    <thead>
                        <tr>
                            <th>
                                选择
                            </th>
                            <th>
                                入库单号
                            </th>
                            <th>
                                入库日期
                            </th>
                            <th>
                              版本号
                            </th>
                            <th>
                                卡类型
                            </th>
                            <th>
                                制卡批次号
                            </th>
                             <th>
                                文件初始卡号
                            </th>
                                 <th>
                                文件结束卡号
                            </th>
                                  <th>
                                记录总数
                            </th>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td align="center" width="70px">
                       <a href="#" onclick="ReturnSelData('<%# Eval("ID")%>','<%# Eval("PUTINNO")%>','<%# Eval("cardtypename")%>','<%# Eval("suppliersname")%>');" style="color:Blue;">选择</a>
                    </td>
                        <td align ="center">
                        <%# Eval("PUTINNO")%>
                    </td>
                    <td align ="center">
                        <%#string.Format("{0:d}", Eval("PUTINDATE"))%>
                    </td>
                    <td align ="center" >
                       <%# Eval("VERSION")%>
                    </td>
                    <td align ="center">
                         <%# Eval("CARDKIND")%>
                    </td>
                       <td align ="center">
                      <%# Eval("BATCHID")%>
                    </td>
                   <td align="center">
                         <%# Eval("CARDBEGINSSN")%>
                    </td>
                         <td align="center">
                        <%# Eval("CARDENDSSN")%>
                    </td>
                        <td align="center">
                        <%# Eval("RECNUM")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody></table>
            </FooterTemplate>
        </asp:Repeater>
        <webdiyer:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
            runat="server" Width="100%" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页"
            NextPageText="下一页" PageSize="10" PrevPageText="上一页" ShowCustomInfoSection="left"
            ShowInputBox="Never" CustomInfoTextAlign="Left" LayoutType="Table" OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
        <asp:HiddenField ID="hdfDelete" runat="server" />
    </div>
    <script type="text/javascript">
        $('.tablelist tbody tr:odd').addClass('odd');

        function ReturnSelData(id, PutInNo,cardtypename,suppliersname) {
            //返回：[0]入库单ID [1]入库单号
            parent.document.getElementById("hf_PutInCardId").value = id; //出库单ID
            parent.document.getElementById("PutInCardNo").value = PutInNo; //入库单号
            if (parent.document.getElementById("CardType") != undefined)
                parent.document.getElementById("CardType").value = cardtypename; //半成品/成品明细调用卡类型
            if (parent.document.getElementById("SupName") != undefined)
                parent.document.getElementById("SupName").value = suppliersname; //半成品/成品明细调用供应商
            if (parent.document.getElementById("btn_PutInCardNo") != undefined)
                parent.document.getElementById("btn_PutInCardNo").click();
            window.parent.$.tipsWindow.removeBox();
        }

    </script>
    </form>
</body>
</html>
